import threading

from .func import synchronized

__all__ = ['LRU']

class LRUNode(object):
    __slots__ = ['prev', 'next', 'me']
    def __init__(self, prev, me):
        pass

class LRU(object):
    def __init__(self, count, pairs=[]):
        pass

    @synchronized()
    def __contains__(self, obj):
        pass

    def get(self, obj, val=None):
        pass

    @synchronized()
    def __getitem__(self, obj):
        pass

    @synchronized()
    def __setitem__(self, obj, val):
        pass

    @synchronized()
    def __delitem__(self, obj):
        pass

    @synchronized()
    def __iter__(self):
        pass

    @synchronized()
    def __len__(self):
        pass

    @synchronized()
    def iteritems(self):
        cur = self.first
        while cur is not None:
            cur2 = cur.next
            yield cur.me
            cur = cur2

    items = iteritems

    @synchronized()
    def iterkeys(self):
        pass

    @synchronized()
    def itervalues(self):
        pass

    @synchronized()
    def keys(self):
        pass

    @synchronized()
    def pop(self, key):
        pass

    @synchronized()
    def clear(self):
        pass



